<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript">
	$(function(){
		$("#loginButton").bind("click",function(){
			var url = "${pageContext.request.contextPath }/login.do";
			$.post(url,$("#loginFrom").serialize(),function(data){
				alert(data);
			},"json");
		});
		
		$("#addButton").bind("click",function(){
			var url = "${pageContext.request.contextPath }/addAccount.do";
			$.post(url,$("#addFrom").serialize(),function(data){
				alert(data);
			},"json");
		});
		
	});
</script>
<title>用户登录</title>
</head>
<body>
	<form id="loginFrom">
		用户名：<input type="text" name="loginName"/><br/>
		密码：<input type="password" name="password"/><br/>
		<input type="button" id="loginButton" value="登录"/>
	</form>
	<form id="addFrom">
		用户名：<input type="text" name="loginName"/><br/>
		登陆名：<input type="text" name="userName"/><br/>
		密码：<input type="password" name="password"/><br/>
		<input type="button" id="addButton" value="保存"/>
	</form>
</body>
</html>